"""
@author: canyue
用户实体类
"""
import time


class User:
    def __init__(self, name: str, password: str, is_admin: int, create_time: int):
        self.name = name
        self.password = password        # 非管理员用户，该属性无意义
        self.is_admin = is_admin
        self.create_time = time.localtime(create_time)

    def __str__(self):
        return (f"name:{self.name},password:{self.password},is_admin:{self.is_admin},create_time:"
                + time.strftime("%Y-%m-%d %H:%M:%S", self.create_time))
